USE danhchothieunhi;

EXEC sp_fulltext_database 'enable'				  
--vietnamese: 1066
-- Create fulltext search catalog
CREATE FULLTEXT CATALOG MySearching; 
GO 

ALTER FULLTEXT CATALOG [MySearching] REBUILD WITH ACCENT_SENSITIVITY = OFF

-- Create indexes
CREATE UNIQUE INDEX idxVideo_YoutubeID
ON Video (YoutubeID)


-- Create fulltext index for table Video
CREATE FULLTEXT INDEX ON Video
 ( 
  YoutubeID
     Language 1033,
  Title
     Language 1033,
  Description
     Language 1033     
 ) 
  KEY INDEX idxVideo_YoutubeID
      ON MySearching; 
GO

-- Create fulltext index for table Tag
CREATE FULLTEXT INDEX ON Tag
 ( 
  Name
     Language 1033
 ) 
  KEY INDEX PK_Tag
      ON MySearching; 
GO

